/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#ifndef __APPLICATION_H__
#define __APPLICATION_H__

#include "Ogre.h"

namespace Fish3D
{
	/** This class is the represent of the application
        @remarks
            
    */
	class Application
	{
	protected:
		Application(void);
		~Application(void);
	public:
		static Application& getSingleton()
		{
			static Application app;
			return app;
		}

		void init();
		void start();
		void shutdown();

		void defineResource();
		void update();

		inline Ogre::Root *getOgreRoot()
		{
			return _root;
		}

		inline Ogre::RenderWindow *getRenderWindow()
		{
			return _win;
		}

	private:
		Ogre::Root *_root;
		Ogre::RenderWindow *_win;
		Ogre::Timer timer;

		bool _running;
		unsigned long lastTime;
	};
}
#endif
